# encoding: utf-8
# @project: st2111 
# @file: re_groups.py
# @time: 2023/4/13 14:04
# @author: abcque
# @license: (C) Copyright 2013-2021
# @contact: abcque@outlook.com
# @IDE: PyCharm
# @desc:
from chapter5.regular_expression.testre.re_test_patterns import test_patterns

if __name__ == "__main__":
    text = "abbaaaaabbbbba"
    patterns = [
        ("a(ab)", "字符 a  后面紧跟着 字符 ab"),
        ("a(a*b*)", "字符 a  后面紧跟着 0个及以上的字符 a，紧跟着 0个及以上的字符b"),
        ("a(ab)*", "字符 a 后面紧跟着 0个以以上的串 ab"),
        ("a(ab)+", "字符 a 后面紧跟着 1个以以上的串 ab"),
    ]

    test_patterns(text=text, patterns=patterns)
